﻿// -----------------------------------------------------------------------
// <copyright file="IgnoredServiceCollection.cs" company="FastNET Services">
//     Copyright (c) 2008-2009. All Rights Reserved.
// </copyright>
// <license>
//    GPLv2
// </license>
// <warranty>
//     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
//     BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
//     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
//     DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// </warranty>
// -----------------------------------------------------------------------
#region Usings

using System;
using System.Collections;
using System.ComponentModel;

#endregion

namespace GateShift.Servers.GameServer.Configuration.Services
{
    /// <summary>
    /// Collection for IgnoredService
    /// </summary>
    [Serializable]
    [EditorBrowsable(EditorBrowsableState.Advanced)]
    public class IgnoredServiceCollection : ArrayList
    {
        /// <summary>
        /// Gets or sets a strongly typed IgnoredService from the collection of items
        /// </summary>
        /// <param name="index">Zero based index to retrieve</param>
        /// <returns>IgnoredService from the specified index</returns>
        public new IgnoredService this[int index]
        {
            get { return (IgnoredService)base[index]; }
            set { base[index] = value; }
        }

        /// <summary>
        /// Adds a new IgnoredService to the list and returns the instance
        /// </summary>
        /// <param name="item">IgnoredService to add</param>
        /// <returns>IgnoredService that was added</returns>
        public IgnoredService Add(IgnoredService item)
        {
            base.Add(item);
            return item;
        }

        /// <summary>
        /// Adds a new IgnoredService and returns the instance
        /// </summary>
        /// <returns>IgnoredService that was added</returns>
        public IgnoredService Add()
        {
            return Add(new IgnoredService());
        }

        /// <summary>
        /// Injects an instance of IgnoredService into the collection of IgnoredService
        /// </summary>
        /// <param name="index">Zero based index to insert the item at</param>
        /// <param name="item">IgnoredService to add</param>
        public void Insert(int index, IgnoredService item)
        {
            base.Insert(index, item);
        }

        /// <summary>
        /// Removes the specified instance of IgnoredService from the collection
        /// </summary>
        /// <param name="item">IgnoredService to remove</param>
        public void Remove(IgnoredService item)
        {
            base.Remove(item);
        }
    }
}